<?php

class Author {
    
    private $uri;
    private $name;
    
    public function __construct($uri, $name) {
        $this->setName($name);
        $this->setUri($uri);
    }
    
    private function setUri($uri) {
        if(empty($uri)) {
            throw new Exception("URI cannot be set empty.");
        }
        $this->uri = $uri;
    }
    
    private function setName($name) {
        if(empty($name)) {
            throw new Exception("Author name cannot be set empty.");
        }
        $this->name = $name;
    }
}